package kr.hkit.framework.inputPanel;

import javax.swing.JPanel;
import java.awt.GridLayout;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;

public class InputTxtPanel extends JPanel {
	private static final long serialVersionUID = 1L;

	private JTextField tfValue;
	private JLabel lblTitle;

	public InputTxtPanel() {

		initialize();
	}

	public InputTxtPanel(String title) {
		initialize();
		lblTitle.setText(title);

	}

	private void initialize() {
		setLayout(new GridLayout(0, 2, 5, 5));

		lblTitle = new JLabel();
		lblTitle.setHorizontalAlignment(SwingConstants.CENTER);
		add(lblTitle);

		tfValue = new JTextField();
		add(tfValue);
	}

	public JTextField getTfValue() {
		return tfValue;
	}

	public void setTfValue(String text) {
		this.tfValue.setText(text);
	}

	public String getLblTitle() {
		return lblTitle.getText();
	}

	public void setLblTitle(String title) {
		this.lblTitle.setText(title);
	}

}
